package designPattern.mvc
{
	import flash.display.MovieClip;
	import flash.display.Stage;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	import flash.system.Capabilities;

	public class MVCMainClass
	{
		public function MVCMainClass(root:Stage)
		{
			trace(flash.system.Capabilities.playerType);
			
			trace(Math.round(-11.4));
			trace(Math.round(-11.49));
			trace(Math.round(-11.5));
			trace(Math.round(-11.5000));
			trace(Math.round(-11.5000001));
			trace(Math.round(-11.51));
			trace(Math.round(-11.6));
			
			trace(Math.round(11.48));
			trace(Math.round(11.49));
			trace(Math.round(11.4999999999999));
			trace(Math.round(11.5));
			trace(Math.round(11.51));
			trace(Math.round(11.6));
			
			var model:IModel = new Model();
			var contr:IControl = new Control(model);
			var view:IView = new View(model, contr, root);
		}
		
		public static function alert(msg:String):void
		{
			var context:String = "javascript:alert(" + msg + ")";
			navigateToURL(new URLRequest(context), "_self");
		}
	}
}